<?php

namespace App\Controllers;

use JsonLowCode\Helps\Random;

class Login
{
    public function index(){
        echo json_encode(["result"=>['data'=>[
            'token'=> Random::alpha(16),
            'refreshToken'=>Random::alpha(16),
        ],'error'=>''],"status"=>1,"msg"=>"ok"]);
    }

    public function getUserInfo(){
        echo json_encode(["result"=>['data'=>[
            'userName'=> "超级管理员",
            'roles'=>['super']
        ],'error'=>''],"status"=>1,"msg"=>"ok"]);
    }
}